Title Banner

Technical Q&A;'s

OPS 12 - Using PixPatHandle to Access the "Set Utilities Pattern" Pattern (27-September-96)


Q How can I access the "Set Utilities Pattern" pattern? (This pattern is set by holding down the option key in the Desktop Patterns Control Panel.)



A This control panel uses resources of type 'ppat' to store this pattern. The `ppat' resource is stored in the System file in your System Folder; the desktop pattern has an ID of 16 and the utilities pattern has an ID of 42. Since this is not documented, it could be subject to change at any moment. You should be careful when using this.

 

A snippet of code is included here to show you how you can get to these two `ppat' resources.

 PixPatHandle ppatHandle;
 	  ppatHandle = (PixPatHandle) GetPixPat(42);
	  if (ppatHandle != NULL) {
		  SetRect(&destRect;, 15, 125, 197, 164);
		  FrameRect(&destRect;);
		  FillCRect(&destRect;, ppatHandle);
		  DisposePixPat(ppatHandle);
	  }
 
Note:
You can just use GetPixPat to access a `ppat' resource -- the additional code just shows how to draw with it and dispose of it when done.



Technical Support
Technical Q&As;
Previous Question | Contents | Next Question

Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help